package game.uno.server;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

public class Network 
{
	ServerSocket serverSocket;
	
	Socket clientSocket;
	
	PrintWriter clientOutput;
	BufferedReader clientInput;
	
	String inputLine, outputLine;
	
	public Network()
	{
		try 
		{
			serverSocket = new ServerSocket(779);
			clientSocket = serverSocket.accept();
			
			clientOutput = new PrintWriter(clientSocket.getOutputStream(),true);
			clientInput = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
			
			while((inputLine = clientInput.readLine()) != null)
			{
				System.out.println(inputLine);
			}
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}
	}
}
